package com.kx.center.controller;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.kx.center.common.Constant;
import com.kx.center.service.SendEmailService;

/**
 * 测试发送邮件
 * @description 
 * @version 1.0
 * @author Scott 
 * @date 2016年1月18日 下午3:08:24
 */
@Controller
@RequestMapping("email")
public class SendEmailController {

	@Autowired
	SendEmailService emailService ;
	
	@RequestMapping(value = "/send" ,method = RequestMethod.GET ,produces = "application/json;charset=UTF-8")
	public void sendEmail (){
		List<String> acceptEmail = new ArrayList<>();
		acceptEmail.add("scott.li@4chen.cn");
		acceptEmail.add("1797796072@qq.com");
		acceptEmail.add("623904391@qq.com");
		
		emailService.sendEmailFromTemplate(Constant.VM_SAY_HELLO, acceptEmail, null);
	}
	
}
